﻿using System.Text.RegularExpressions;

namespace Xioa_UI.Service;

public static class StringHelper
{
    /// <summary>
    /// 判断是否包含特殊字符
    /// </summary>
    /// <param name="str"></param>
    /// <returns>包含特殊字符：true</returns>
    public static bool IsSpecialChar(this string str)
    {
        Regex regExp = new("[^0-9a-zA-Z\u4e00-\u9fa5\\-]");
        return regExp.IsMatch(str);
    }
    
    
}